package com.codeduck;

import com.codeduck.service.consumer.AcctDetailConsumer;
import com.codeduck.service.consumer.BillNoticeConsumer;
import com.codeduck.service.consumer.SystemLogConsumer;
import com.codeduck.utils.SpringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.swing.*;

@SpringBootApplication
public class KafkaClientStart {
    private static final Logger LOGGER = LoggerFactory.getLogger(KafkaClientStart.class);


    public static void main(String[] args) {
        SpringApplication.run(KafkaClientStart.class, args);
        LOGGER.info("=============================Application started================================");

        AcctDetailConsumer acctDetailConsumer = SpringUtils.getBean(AcctDetailConsumer.class);
        acctDetailConsumer.init();
        BillNoticeConsumer billNoticeConsumer = SpringUtils.getBean(BillNoticeConsumer.class);
        billNoticeConsumer.init();
        SystemLogConsumer systemLogConsumer = SpringUtils.getBean(SystemLogConsumer.class);
        systemLogConsumer.init();

    }
}